package com.langfeiyes.pattern.decorator;

//晶石装饰器-对应Decorator
public   class CrystalDecorator implements ISword{
    private ISword sword;  //被装饰对象
    public CrystalDecorator(ISword sword) {
        this.sword = sword;
    }
    @Override
    public String desc() {
        return sword.desc() + "\n";
    }
    @Override
    public int attackValue() {
        return sword.attackValue();
    }
}
